<?php
	header("Content-type:text/html;charset=utf-8");
	
	$name = $_POST["phone"];
	$pwds = $_POST["pwd"];
	$conn = mysql_connect("localhost","root","root");
	
	mysql_select_db("2107");
	
	$result = mysql_query("insert into user(phone,password) values('$name','$pwds')",$conn);
	
	if(mysql_num_rows($result) == 1){
		//在参数ajax的php文件中,echo是返回数据的关键字
		echo "注册成功";
	}else{
		echo "注册失败";
	}
?>